Next | Prev | Up | Top | Contents | Index

Summary

Table 2-2 summarizes the steps that are needed to integrate an OpenGL program with the X Window System. Note that the GLX functions are usually shared, while other functions differ for IRIS IM or Xlib.

Integrating OpenGL and X
StepUsing IRIS IMUsing Xlib
"Opening the X Display"XtOpenApplicationXOpenDisplay
Making sure GLX is supported (optional)glXQueryExtension

glXQueryVersion

glXQueryExtension

glXQueryVersion

"Selecting a Visual"glXChooseVisualglXChooseVisual
"Creating a Rendering Context"glXCreateContextglXCreateContext
"Creating the Window" (see Chapter 3, "OpenGL and X: Examples")XtVaCreateManagedWidget, with glwMDrawingAreaWidgetClassXCreateColormap

XCreateWindow

"Binding the Context to the Window"GLwDrawingAreaMakeCurrentglXMakeCurrent
"Mapping the Window"XtRealizeWidgetXMapWindow

Additional example programs are provided in Chapter 3, "OpenGL and X: Examples."



Next | Prev | Up | Top | Contents | Index